package cn.ly.jvm.loader.diffloader;

import java.sql.SQLException;

public class JDBCTest {
	
	public static void main(String[] args) throws ClassNotFoundException, SQLException {
		Class.forName("com.mysql.jdbc.Driver");
		String mysqlUrl = "jdbc:mysql://192.168.0.121:3306/testdb";	 
		/*Connection conn = DriverManager.getConnection(mysqlUrl, "root", "root");  
		System.out.println(conn.getClass().getClassLoader());
		if(conn != null){
			conn.close();
		}*/
		//System.out.println(DriverManager.class.getClass().getClassLoader());
		Object o = new Object();
		System.out.println(String.class.getClassLoader());
		//DriverManager和Object 都属于rt.jar包，所以它们同属于同一个类加载器，Bootstrap
		//但是对于这个类加载器，jdk的方法只是null
	}
}
